package net.pm.core.service;

import net.pm.common.service.GenericServicer;
import net.pm.common.toolkit.PMRetcodeGenerator;
import net.pm.common.toolkit.Pager;
import net.pm.core.entities.db.Material;

public interface MaterialServicer extends GenericServicer<Material, Long>{

	/**
	 * 新增物料
	 * @param material
	 * @return
	 */
	Long createMaterial(Material material);
	Long create_material_success = PMRetcodeGenerator.next();		//新增物料成功
	Long create_material_failed = PMRetcodeGenerator.next();		//新增物料失败
	
	
	/**
	 * 分页查找物料
	 * @param pagesize
	 * @param pageno
	 * @return
	 */
	Pager<Material> findMaterialPager(Integer pagesize,Integer pageno,String materialName);
	
	
	/**
	 * 根据id获取物料信息
	 * @param materialId
	 * @return
	 */
	Material findMaterialById(Long materialId);
	
	
	/**
	 * 领取物料　
	 * @param materialId
	 * @param getNumber
	 * @return
	 */
	Long collarMaterial(Long materialId,Integer getNumber);
	Long collar_material_suceess = PMRetcodeGenerator.next();
	Long collar_material_failed = PMRetcodeGenerator.next();
	
}
